import type { RouteRecordRaw } from "vue-router"

export const LOGIN_ROUTE_NAME = "Login", HOME_ROUTE_NAME = "Root", HOME_ROUTE_PATH = "/"

export const staticRoutes: RouteRecordRaw[] = [
    {
        path: HOME_ROUTE_PATH,
        name: HOME_ROUTE_NAME,
        redirect: "/home/console",
    },
    {
        path: "/home",
        name: "Home",
        component: () => import("@/layout/Layout.vue"),
        children: [{
            name: "Console",
            meta: {
                title: "首页"
            },
            path: "/home/console",
            component: () => import("@/views/Home/Console.vue")
        }],
    },
    {
        path: '/login',
        name: LOGIN_ROUTE_NAME,
        meta: {
            isNeedLogin: false
        },
        component: () => import("@/views/Login.vue")
    },
    // {
    //     path: '/:path(.*)*',
    //     redirect: '/404',
    // },
    {
        path: '/404',
        name: 'NotFound',
        meta: {
            title: 'Page not found',
            isNeedLogin: false
        },
        component: () => import('@/views/Error.vue')
    },
]
